ConfigSection

A section of a Config

Use to organize related sub-topics of a larger config. Auto GUI creation will use sections to create separate "layers" of GUI Screens for the player to drill down into. Recommended practice is to group all sections at the beginning or end of a Config, so the section widgets in the GUI are grouped together, and the non-grouped entries are also all together.

Follows the same rules as a Config regarding setting definitions. See the documentation for Config for details.

Author

fzzyhmstrs

Since

0.2.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun actions(): Set<Action>

Return a set of Action that this parents children are annotated with. This is used to show the total set of actions relevant to this parent to the user in-game.

Link copied to clipboard
open override fun anchorEntry(anchor: EntryAnchor.Anchor): EntryAnchor.Anchor

Anchor modifier method for a section. By default, provides a "map" icon decoration to the base anchor. You can provide a custom icon if you want a special icon for the config in the goto menu. If your config has a long name, you may also want to create and provide a shortened "summary" name for a goto link.

Link copied to clipboard
override fun anchorId(scope: String): String
Link copied to clipboard
open fun continueWalk(): Boolean

Whether the screen manager should skip over analyzing this parents internals.

Link copied to clipboard
open override fun createEntry(context: EntryCreator.CreatorContext): List<EntryCreator.Creator>

Builds one or more DynamicListWidget.Entry from provided CreatorContext. These entries are used to build config GUIs, being the "building block" of the settings list.

Link copied to clipboard
open fun description(fallback: String? = null): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun descriptionKey(): String

translation key of this Translatable's description. the "description" in-game, the descriptions Enchantment Descriptions adds to enchantment tooltips are a good example.

Link copied to clipboard
open fun deserializedChanged(old: Any?, new: Any?): Boolean

Specialized equals method for determining if a newly deserialized value is effectively equal to its old counterpart.

Link copied to clipboard
open override fun getEntryKey(): String
Link copied to clipboard

Whether this Translatable has a valid description

Link copied to clipboard
open fun hasPrefix(): Boolean

Whether this Translatable has a valid prefix

Link copied to clipboard

Whether this Translatable has a valid translation

Link copied to clipboard
open fun prefix(fallback: String? = null): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun prefixKey(): String

translation key of this Translatable's inline prefix text. Unlike descriptions, which are usually displayed in-tooltips, prefixes are displayed inline in the config screen itself

Link copied to clipboard
open fun prepare(scope: String, groups: LinkedList<String>, annotations: List<Annotation>, globalAnnotations: List<Annotation>)

Called in the prepare stage of screen building to perform any necessary pre-entry-creation tasks.

Link copied to clipboard
open override fun setEntryKey(key: String)
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun translation(fallback: String? = null): MutableText

The translated Text name from the translationKey. Falls back to the implementing classes Simple Name (non-translated)

Link copied to clipboard
open override fun translationKey(): String

translation key of this Translatable. the "name" in-game